@gpc-cli/core 0.9.73 → 0.9.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +82 -2
- package/dist/index.js +534 -205
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OutputFormat, ResolvedConfig, WebhookConfig } from '@gpc-cli/config';
|
|
2
2
|
import { AuthClient } from '@gpc-cli/auth';
|
|
3
3
|
import { GpcPlugin, PluginManifest, CommandEvent, CommandResult, PluginError, RequestEvent, ResponseEvent, PluginCommand } from '@gpc-cli/plugin-sdk';
|
|
4
|
-
import { PlayApiClient, EditCommitOptions, Track, ExternallyHostedApk, ExternallyHostedApkResponse, DeobfuscationFileType, UploadProgressEvent, ResumableUploadOptions, Listing, ImageType, CountryAvailability, Image, AppDetails, Review, ReviewReplyResponse, Subscription, SubscriptionOffer, OffersListResponse, BasePlanMigratePricesRequest, InAppProduct, Order, SubscriptionDeferResponse, SubscriptionsV2DeferResponse, ProductPurchase, ProductPurchaseV2, SubscriptionPurchaseV2, VoidedPurchase, UsersApiClient, User, DeveloperLevelPermission, Grant, MetricRow, ReportingDimension, ReportingAggregation, VitalsMetricSet, ReportingApiClient, AnomalyDetectionResponse, MetricSetResponse, ErrorIssuesResponse, ConvertRegionPricesResponse, ReportType, StatsDimension, ReportBucket, Testers, AppRecoveryTargeting, AppRecoveryAction, CreateAppRecoveryActionRequest, DataSafetyResponse, DataSafetyRequest, ExternalTransaction, ExternalTransactionRefund, DeviceTierConfig, OneTimeOffer, OneTimeProduct, OneTimeOffersListResponse, OneTimeProductsListResponse, GamesConfigClient, AchievementConfiguration, LeaderboardConfiguration, AchievementConfigurationListResponse, GamesApiClient, Achievement, LeaderboardConfigurationListResponse, Leaderboard, EnterpriseApiClient, CustomApp, GeneratedApksPerSigningKey, Bundle } from '@gpc-cli/api';
|
|
4
|
+
import { PlayApiClient, EditCommitOptions, Track, ExternallyHostedApk, ExternallyHostedApkResponse, DeobfuscationFileType, UploadProgressEvent, ResumableUploadOptions, Listing, ImageType, CountryAvailability, Image, AppDetails, Review, ReviewReplyResponse, Subscription, SubscriptionOffer, OffersListResponse, BasePlanMigratePricesRequest, InAppProduct, Order, SubscriptionDeferResponse, SubscriptionsV2DeferResponse, ProductPurchase, ProductPurchaseV2, SubscriptionPurchaseV2, VoidedPurchase, UsersApiClient, User, DeveloperLevelPermission, Grant, MetricRow, ReportingDimension, ReportingAggregation, VitalsMetricSet, ReportingApiClient, AnomalyDetectionResponse, MetricSetResponse, ErrorIssuesResponse, ConvertRegionPricesResponse, ReportType, StatsDimension, ReportBucket, Testers, AppRecoveryTargeting, AppRecoveryAction, CreateAppRecoveryActionRequest, DataSafetyResponse, DataSafetyRequest, ExternalTransaction, ExternalTransactionRefund, DeviceTierConfig, OneTimeOffer, OneTimeProduct, OneTimeOffersListResponse, OneTimeProductsListResponse, GamesConfigClient, AchievementConfiguration, LeaderboardConfiguration, AchievementConfigurationListResponse, GamesApiClient, Achievement, LeaderboardConfigurationListResponse, Leaderboard, ImageConfiguration, EnterpriseApiClient, CustomApp, GeneratedApksPerSigningKey, Bundle } from '@gpc-cli/api';
|
|
5
5
|
|
|
6
6
|
declare class GpcError extends Error {
|
|
7
7
|
readonly code: string;
|
|
@@ -492,6 +492,19 @@ interface ReviewAnalysis {
|
|
|
492
492
|
ratingDistribution: Record<number, number>;
|
|
493
493
|
}
|
|
494
494
|
|
|
495
|
+
/** Named sort presets for `reviews list --sort`. */
|
|
496
|
+
declare const REVIEW_SORT_PRESETS: readonly ["newest", "oldest", "rating"];
|
|
497
|
+
type ReviewSortPreset = (typeof REVIEW_SORT_PRESETS)[number];
|
|
498
|
+
/**
|
|
499
|
+
* Sort reviews by a named preset (`newest` | `oldest` | `rating`) or, for any
|
|
500
|
+
* other spec, fall back to the generic field-based `sortResults`. Presets are
|
|
501
|
+
* required because rating and date live under `comments[0].userComment.*`,
|
|
502
|
+
* which the generic dot-path sorter cannot index into. Does not mutate input.
|
|
503
|
+
*
|
|
504
|
+
* Note: this orders the fetched window only (the API returns recent reviews,
|
|
505
|
+
* bounded by `--max`), not all-time.
|
|
506
|
+
*/
|
|
507
|
+
declare function sortReviews(reviews: Review[], spec?: string): Review[];
|
|
495
508
|
interface ReviewsFilterOptions {
|
|
496
509
|
stars?: number;
|
|
497
510
|
language?: string;
|
|
@@ -929,6 +942,19 @@ declare function createLeaderboardConfig(client: GamesConfigClient, applicationI
|
|
|
929
942
|
declare function updateLeaderboardConfig(client: GamesConfigClient, leaderboardId: string, data: LeaderboardConfiguration): Promise<LeaderboardConfiguration>;
|
|
930
943
|
declare function deleteLeaderboardConfig(client: GamesConfigClient, leaderboardId: string): Promise<void>;
|
|
931
944
|
declare function diffLeaderboardConfig(client: GamesConfigClient, leaderboardId: string, localData: LeaderboardConfiguration): Promise<GameConfigDiff[]>;
|
|
945
|
+
declare function setAchievementIcon(client: GamesConfigClient, achievementId: string, filePath: string): Promise<ImageConfiguration>;
|
|
946
|
+
declare function setLeaderboardIcon(client: GamesConfigClient, leaderboardId: string, filePath: string): Promise<ImageConfiguration>;
|
|
947
|
+
interface GamesSyncResult {
|
|
948
|
+
created: string[];
|
|
949
|
+
updated: string[];
|
|
950
|
+
}
|
|
951
|
+
interface GamesPushOptions {
|
|
952
|
+
dryRun?: boolean;
|
|
953
|
+
}
|
|
954
|
+
declare function pushAchievementConfigs(client: GamesConfigClient, applicationId: string, dir: string, options?: GamesPushOptions): Promise<GamesSyncResult>;
|
|
955
|
+
declare function pullAchievementConfigs(client: GamesConfigClient, applicationId: string, dir: string): Promise<string[]>;
|
|
956
|
+
declare function pushLeaderboardConfigs(client: GamesConfigClient, applicationId: string, dir: string, options?: GamesPushOptions): Promise<GamesSyncResult>;
|
|
957
|
+
declare function pullLeaderboardConfigs(client: GamesConfigClient, applicationId: string, dir: string): Promise<string[]>;
|
|
932
958
|
|
|
933
959
|
/**
|
|
934
960
|
* Parameters for creating a private enterprise app via the Play Custom App
|
|
@@ -1301,6 +1327,8 @@ interface StatusReviews {
|
|
|
1301
1327
|
previousAverageRating: number | undefined;
|
|
1302
1328
|
totalNew: number;
|
|
1303
1329
|
positivePercent: number | undefined;
|
|
1330
|
+
/** Topic/sentiment/keyword breakdown; present only with `--full`. */
|
|
1331
|
+
analysis?: ReviewAnalysis;
|
|
1304
1332
|
}
|
|
1305
1333
|
interface AppStatus {
|
|
1306
1334
|
packageName: string;
|
|
@@ -1347,6 +1375,8 @@ interface GetAppStatusOptions {
|
|
|
1347
1375
|
days?: number;
|
|
1348
1376
|
reviewDays?: number;
|
|
1349
1377
|
sections?: string[];
|
|
1378
|
+
/** Attach a topic/sentiment breakdown to the reviews section (no extra API call). */
|
|
1379
|
+
full?: boolean;
|
|
1350
1380
|
vitalThresholds?: {
|
|
1351
1381
|
crashRate?: number;
|
|
1352
1382
|
anrRate?: number;
|
|
@@ -1694,4 +1724,54 @@ interface ChecklistInput {
|
|
|
1694
1724
|
declare function buildChecklist(input: ChecklistInput): ChecklistResult;
|
|
1695
1725
|
declare function renderChecklistMarkdown(result: ChecklistResult, accountEmail: string): string;
|
|
1696
1726
|
|
|
1697
|
-
|
|
1727
|
+
/** Status of a single readiness signal. `na` = not evaluated (excluded from the score). */
|
|
1728
|
+
type ReadinessSignalStatus = "pass" | "warn" | "fail" | "na";
|
|
1729
|
+
type ReadinessGrade = "A" | "B" | "C" | "D" | "F";
|
|
1730
|
+
/** One weighted input to the score. */
|
|
1731
|
+
interface ReadinessSignal {
|
|
1732
|
+
key: string;
|
|
1733
|
+
label: string;
|
|
1734
|
+
weight: number;
|
|
1735
|
+
status: ReadinessSignalStatus;
|
|
1736
|
+
/** Short human detail (e.g. the underlying check message). */
|
|
1737
|
+
detail?: string;
|
|
1738
|
+
/** Remediation hint, surfaced when status is not `pass`. */
|
|
1739
|
+
suggestion?: string;
|
|
1740
|
+
}
|
|
1741
|
+
/** One row of the computed breakdown. */
|
|
1742
|
+
interface ReadinessBreakdownEntry {
|
|
1743
|
+
key: string;
|
|
1744
|
+
label: string;
|
|
1745
|
+
weight: number;
|
|
1746
|
+
status: ReadinessSignalStatus;
|
|
1747
|
+
/** Weight earned by this signal: `weight * fraction`, or 0 for `na`. */
|
|
1748
|
+
points: number;
|
|
1749
|
+
detail?: string;
|
|
1750
|
+
}
|
|
1751
|
+
interface ReadinessScore {
|
|
1752
|
+
grade: ReadinessGrade;
|
|
1753
|
+
/** 0-100. 0 when nothing was evaluated (see `evaluated`). */
|
|
1754
|
+
percent: number;
|
|
1755
|
+
/** false when every signal was `na` — the grade is not meaningful. */
|
|
1756
|
+
evaluated: boolean;
|
|
1757
|
+
earned: number;
|
|
1758
|
+
possible: number;
|
|
1759
|
+
breakdown: ReadinessBreakdownEntry[];
|
|
1760
|
+
suggestions: string[];
|
|
1761
|
+
}
|
|
1762
|
+
/** Grade bands: A >= 90, B >= 80, C >= 70, D >= 60, F < 60. */
|
|
1763
|
+
declare function gradeFromPercent(percent: number): ReadinessGrade;
|
|
1764
|
+
/**
|
|
1765
|
+
* Compute a weighted release-readiness score. `na` signals are excluded from
|
|
1766
|
+
* both the earned and possible totals so they never move the grade.
|
|
1767
|
+
*/
|
|
1768
|
+
declare function scoreReadiness(signals: ReadinessSignal[]): ReadinessScore;
|
|
1769
|
+
declare function readinessBadgeColor(grade: ReadinessGrade): string;
|
|
1770
|
+
/**
|
|
1771
|
+
* Build a static shields.io badge URL for the score. No hosted endpoint: the
|
|
1772
|
+
* grade is baked into the URL, so it is safe to commit into a README.
|
|
1773
|
+
*/
|
|
1774
|
+
declare function readinessBadgeUrl(score: ReadinessScore): string;
|
|
1775
|
+
declare function readinessBadgeMarkdown(score: ReadinessScore): string;
|
|
1776
|
+
|
|
1777
|
+
export { ApiError, type ApiSigningFingerprint, type AppInfo, type AppStatus, type ApplyReleaseNotesResult, type AuditEntry, type BatchSyncResult, type BundleAnalysis, type BundleComparison, type BundleEntry, type BundleSizeCheckResult, type BundleSizeConfig, type BundlesWaitOptions, type ChangelogEntry, type ChecklistInput, type ChecklistItem, type ChecklistResult, type CommandContext, type CommitCluster, type CommitResult, ConfigError, type CreateEnterpriseAppParams, DEFAULT_LIMITS, DEFAULT_MODELS, DEFAULT_PREFLIGHT_CONFIG, DEFAULT_WATCH_THRESHOLDS, type DecodedNotification, type DiffToken, type DiscoverPluginsOptions, type DryRunPublishResult, type DryRunResult, type DryRunUploadResult, type ErrorReason, type ExportImagesOptions, type ExportImagesSummary, type FastlaneDetection, type FastlaneLane, type FetchChangelogOptions, type FieldLintResult, type FileValidationResult, type FindingSeverity, GOOGLE_PLAY_LANGUAGES, type GameConfigDiff, type GamesPushOptions, type GamesSyncResult, type GenerateOptions, type GeneratedChangelog, type GetAppStatusOptions, type GitNotesOptions, type GitReleaseNotes, type GitRunner, GpcError, type ImageSyncDetail, type ImageSyncOptions, type ImageSyncResult, type ImageValidationResult, type InitOptions, type InitResult, type InternalSharingUploadResult, type KeystoreFingerprint, type ListGamesConfigOptions, type ListIapOptions, type ListSubscriptionsOptions, type ListUsersOptions, type ListVoidedOptions, type ListingDiff, type ListingFieldLimits, type ListingLintResult, type ListingsResult, type LoadedPlugin, type LocaleBundle, type LocaleEntry, type MigrationResult, NetworkError, type OneTimeProductDiff, type OutputMode, PERMISSION_PROPAGATION_WARNING, PLACEHOLDER_TEXT, PLAY_STORE_LIMIT, PROVIDER_WHITELIST, type ParsedCommit, type ParsedManifest, type ParsedMonth, type PlayStoreFormat, type PlayStoreRenderOptions, PluginManager, type PreflightConfig, type PreflightFinding, type PreflightOptions, type PreflightResult, type PreflightScanner, type Provider, type PublishOptions, type PublishResult, type PushResult, type QuotaUsage, RENDERERS, REVIEW_SORT_PRESETS, type RawCommit, type ReadinessBreakdownEntry, type ReadinessGrade, type ReadinessScore, type ReadinessSignal, type ReadinessSignalStatus, type ReleaseDiff, type ReleaseNotesValidation, type ReleaseStatusResult, type Renderer, type ResolveAiConfigOptions, type ResolveLocalesOptions, type ReviewAnalysis, type ReviewExportOptions, type ReviewSortPreset, type ReviewsFilterOptions, type RevocationRefundType, type RtdnStatus, SECTION_ORDER, SENSITIVE_ARG_KEYS, SENSITIVE_KEYS, SEVERITY_ORDER, type ScaffoldOptions, type ScaffoldResult, type SigningConsistencyResult, type SigningKeyComparison, type Spinner, type StatusDiff, type StatusRelease, type StatusReviews, type StatusVitalMetric, type SubscriptionAnalytics, type SubscriptionDiff, type SyncResult, type ThresholdResult, type TrainConfig, type TrainState, type TranslateBundleOptions, type TranslatedBundle, type TranslationFailure, type TranslationPath, type TranslationResult, type Translator, type TranslatorConfig, type UploadResult, VALID_WATCH_METRICS, type ValidateCheck, type ValidateOptions, type ValidateResult, type VersionVitalsComparison, type VersionVitalsRow, type VitalsOverview, type VitalsQueryOptions, type VitalsTrendComparison, type WatchAction, type WatchCallbacks, type WatchConfig, type WatchEvent, type WatchMetric, type WatchOptions, type WatchRollout, type WatchSummary, type WatchVitalReading, type WatchVitalsOptions, type WebhookPayload, abortTrain, acknowledgeProductPurchase, activateBasePlan, activateOffer, addRecoveryTargeting, addTesters, advanceTrain, analyzeBundle, analyzeRemoteListings, analyzeReviews, annotateListResult, applyReleaseNotes, assignRelease, batchGetOrders, batchSyncInAppProducts, buildChecklist, buildLocaleBundle, bundleToReleaseNotes, cancelRecoveryAction, cancelSubscriptionPurchase, cancelSubscriptionV2, checkBundleSize, checkSigningConsistency, checkThreshold, classifyError, clearAuditLog, commitWithRescue, compareBundles, compareFingerprints, compareVersionVitals, compareVitalsTrend, computeStatusDiff, consumeProductPurchase, convertRegionPrices, createAchievementConfig, createAuditEntry, createDeviceTier, createEnterpriseApp, createExternalTransaction, createGrant, createInAppProduct, createLeaderboardConfig, createOffer, createOneTimeOffer, createOneTimeProduct, createRecoveryAction, createSpinner, createSubscription, createTrack, createTranslator, deactivateBasePlan, deactivateOffer, decodeNotification, defaultGitRunner, deferSubscriptionPurchase, deferSubscriptionV2, deleteAchievementConfig, deleteBasePlan, deleteGrant, deleteImage, deleteInAppProduct, deleteLeaderboardConfig, deleteListing, deleteOffer, deleteOneTimeOffer, deleteOneTimeProduct, deleteSubscription, deployRecoveryAction, detectFastlane, detectOutputFormat, diffAchievementConfig, diffLeaderboardConfig, diffListings, diffListingsCommand, diffListingsEnhanced, diffOneTimeProduct, diffReleases, diffSubscription, discoverPlugins, dispatchWebhook, downloadGeneratedApk, downloadReport, exportImages, exportReviews, fetchAggregateCost, fetchChangelog, fetchReleaseNotes, findBundle, formatChangelogEntry, formatCustomPayload, formatDiscordPayload, formatJunit, formatMoney, formatNotification, formatOutput, formatPathLabel, formatSlackPayload, formatStatusDiff, formatStatusSummary, formatStatusTable, formatWordDiff, generateChangelog, generateMigrationPlan, generateNotesFromGit, getAchievementConfig, getAllScannerNames, getApiSigningFingerprint, getAppInfo, getAppStatus, getCountryAvailability, getDeviceTier, getExternalTransaction, getInAppProduct, getKeystoreFingerprint, getLeaderboardConfig, getListings, getOffer, getOneTimeOffer, getOneTimeProduct, getOrderDetails, getProductPurchase, getProductPurchaseV2, getQuotaUsage, getReleasesStatus, getReview, getRtdnStatus, getSubscription, getSubscriptionAnalytics, getSubscriptionPurchase, getTrainStatus, getUser, getVitalsAnomalies, getVitalsAnr, getVitalsBattery, getVitalsCrashes, getVitalsErrorCount, getVitalsLmk, getVitalsMemory, getVitalsOverview, getVitalsRendering, getVitalsStartup, gradeFromPercent, handleBreach, importDataSafety, importTestersFromCsv, initAudit, initProject, inviteUser, isFinancialReportType, isStatsReportType, isValidBcp47, isValidReportType, isValidStatsDimension, isVersionedNotesDir, lintListing, lintListings, lintLocalListings, listAchievementConfigs, listAchievements, listAuditEvents, listBundles, listDeviceTiers, listGeneratedApks, listGrants, listImages, listInAppProducts, listLeaderboardConfigs, listLeaderboards, listOffers, listOneTimeOffers, listOneTimeProducts, listRecoveryActions, listReports, listReviews, listSubscriptions, listTesters, listTracks, listUsers, listVoidedPurchases, loadPreflightConfig, loadStatusCache, maybePaginate, migratePrices, moreResultsFooter, normalizeFingerprint, parseAppfile, parseCommit, parseFastfile, parseGrantArg, parseKeytoolOutput, parseMonth, parseRemoteUrl, pauseTrain, promoteRelease, publish, publishEnterpriseApp, pullAchievementConfigs, pullLeaderboardConfigs, pullListings, pushAchievementConfigs, pushLeaderboardConfigs, pushListings, readListingsFromDir, readReleaseNotesForVersion, readReleaseNotesFromDir, readinessBadgeColor, readinessBadgeMarkdown, readinessBadgeUrl, redactAuditArgs, redactSensitive, refundExternalTransaction, refundOrder, relativeTime, removeTesters, removeUser, renderChecklistMarkdown, renderJson, renderMarkdown, renderPlayStore, renderPlayStoreJson, renderPlayStoreMd, renderPlayStorePrompt, renderPrompt, replyToReview, resolveAiConfig, resolveLocales, retryOnUploadNotComplete, revokeSubscriptionPurchase, runPreflight, runWatch, runWatchLoop, safePath, safePathWithin, saveStatusCache, scaffoldPlugin, scoreReadiness, searchAuditEvents, searchVitalsErrors, sendNotification, sendWebhook, setAchievementIcon, setLeaderboardIcon, sha256File, sortResults, sortReviews, startTrain, statusHasBreach, syncImages, syncInAppProducts, topFiles, trackBreachState, translateBundle, updateAchievementConfig, updateAppDetails, updateDataSafety, updateGrant, updateInAppProduct, updateLeaderboardConfig, updateListing, updateOffer, updateOneTimeOffer, updateOneTimeProduct, updateRollout, updateSubscription, updateTrackConfig, updateUser, uploadExternallyHosted, uploadImage, uploadInternalSharing, uploadRelease, validateAndCommit, validateBundleForApply, validateImage, validateLanguageCode, validatePackageName, validatePreSubmission, validateReleaseNotes, validateSku, validateTrackName, validateUploadFile, validateVersionCode, waitForBundle, waitForBundleProcessing, watchVitalsWithAutoHalt, wordDiff, writeAuditLog, writeListingsToDir, writeMigrationOutput };
|